﻿@model SAKS.ViewModels.RegisterModel

@{
    ViewBag.Title = "Register";
}
<div class="account">
<h3>创建账户</h3>
<link href="@Url.Content("~/Content/themes/base/validationEngine.jquery.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.validationEngine.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validationEngine-ch.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("form").validationEngine({});
        $("input[type='submit']").button();
    });
</script>

@using (Html.BeginForm())
{
        <div class="editor-label">
            <label for="UserName">用户名</label>
        </div>
        <div class="editor-field">
            <input class="validate[required,custom[onlyLetterNumber],ajax[AjaxUsernameShouldntExist]]" id="UserName" name="UserName" type="text" value="" />
        </div>

        <div class="editor-label">
            <label for="Email">Email</label>
        </div>

        <div class="editor-field">
            <input class="validate[required,custom[email]]" id="Email" name="Email" type="text" value="" />
        </div>

        <div class="editor-label">
            <label for="Password">密码</label>
        </div>
        <div class="editor-field">
            <input class="validate[required,minSize[6],maxSize[30]" id="Password" name="Password" type="password" />
        </div>

        <div class="editor-label">
            <label for="ConfirmPassword">再次输入密码</label>
        </div>
        <div class="editor-field">
            <input class="validate[required,minSize[6],maxSize[30],equals[Password]]" id="ConfirmPassword" name="ConfirmPassword" type="password" />
        </div>
        <br />
        <input type="submit" value="注册"/>
}

@Html.ValidationSummary(true, "创建账户失败。更正错误后重试。")
</div>

